package com.cloud.cmt.usermanage.entity.vo;

import com.alibaba.fastjson.annotation.JSONField;
import com.cloud.cmt.usermanage.constant.EnterpriseConstants;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * 浙江卓锐科技股份有限公司 版权所有 © Copyright 2017<br>
 * 说明: 审核管理列表VO<br>
 * 项目名称: cloud-maintenance <br>
 * 创建日期: 2017年10月26日 09:30 <br>
 * 作者: <a href="6492178@gmail.com">汪萌萌</a>
 */
@Data
@NoArgsConstructor
@ApiModel
public class AuditManagementVO {
    @ApiModelProperty(value = "企业id", example = "1")
    private Long id;
    @JsonProperty("user_code")
    @JSONField(name = "user_code")
    @ApiModelProperty(value = "用户编号", example = "JD_2017102600001")
    private String userCode;
    @JsonProperty("hotel_name")
    @JSONField(name = "hotel_name")
    @ApiModelProperty(value = "酒店名称", example = "汉庭酒店(武林广场店)")
    private String hotelName;
    @JsonProperty("industry")
    @JSONField(name = "industry")
    @ApiModelProperty(value = "行业", example = "酒店")
    private String industry;
    @JsonProperty("referrer")
    @JSONField(name = "referrer")
    @ApiModelProperty(value = "推荐人", example = "张三")
    private String referrer;
    @JsonProperty("apply_for_time")
    @JSONField(name = "apply_for_time", format = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "申请时间", example = "2017-10-26 20:29:02")
    private Date applyForTime;

    @JsonProperty("account_status")
    @JSONField(name = "account_status")
    @ApiModelProperty(value = "账户状态", example = "账户状态(1:待审核,2:试用中,4:试用中,5:使用中,6:已流失)")
    private Integer accountStatus;

    @JsonProperty("enable")
    @JSONField(name = "enable")
    @ApiModelProperty(value = "启用状态", example = "true")
    private Boolean enable;

    /**
     * Instantiates a new Audit management vo.
     *
     * @param id           the id
     * @param userCode     the user code
     * @param hotelName    the hotel name
     * @param industry     the industry
     * @param referrer     the referrer
     * @param applyForTime the apply for time
     */
    public AuditManagementVO(Long id, String userCode, String hotelName, Integer industry, String referrer, Date applyForTime, Integer accountStatus, Boolean enable) {
        this.id = id;
        this.userCode = userCode;
        this.hotelName = hotelName;
        this.industry = EnterpriseConstants.getIndustryType(industry);
        this.referrer = referrer == null ? "无" : referrer;
        this.applyForTime = applyForTime;
        this.accountStatus = accountStatus;
        this.enable = enable;
    }
}
